import axios from 'axios';
import {API_NEW_VERSION} from '../api';
let basePath2 = '/api/v2.0/admin/';
const RENDERACCOUNTS = basePath2 + 'render_accounts';
// 获取报账列表
export const searchRenderAccounts = params => {
  return axios.get(RENDERACCOUNTS, {params: params});
};

// 修改报账状态
export const modifyStatus = params => {
  return axios.post(API_NEW_VERSION + 'render_account/modify_status?id=' + params.id + '&status=' + params.status);
};
// 获取报账明细
export const searchRenderAccountDetails = params => {
  return axios.get(API_NEW_VERSION + 'render_account_details', {params: params});
};
// // 获取订单费用明细列表-不分页
export const searchRenderAccountCostsOrder = params => {
  return axios.get(API_NEW_VERSION + 'render_account_costs/no_page', {params: params});
};
// 获取其他费用明细列表-不分页
export const searchRenderAccountCostsOther = params => {
  return axios.get(API_NEW_VERSION + 'render_account_costs_other/no_page', {params: params});
};
// 根据id获取费用记录信息
export const getRenderAccountCost = params => {
  return axios.get(API_NEW_VERSION + 'render_account_cost', {params: params});
};
// 根据id获取费用记录信息
export const getCostPicture = params => {
  return axios.get(API_NEW_VERSION + 'render_account_cost_picture/cost_id', {params: params});
};
// 新增/修改费用记录信息
// 保存
export const saveRenderAccountCost = (params) => {
  return axios.post(API_NEW_VERSION + 'render_account_cost', params);
};
// 移除费用记录信息
export const deleteRenderAccountCost = params => {
  return axios.delete(API_NEW_VERSION + 'render_account_cost', {params: params});
};
// 根据id获取费用记录信息
export const getDischargeOrgList = params => {
  return axios.get(API_NEW_VERSION + 'render_account/discharge_org_list', {params: params});
};
